Imports System
Imports System.IO
Imports System.Drawing
Imports System.Windows.Forms
Imports System.Threading
Imports Microsoft.DirectX
Imports Microsoft.DirectX.DirectSound

Public Class RecordSound

    Public Sub New(ByVal pfrmWiiDrums As frmWiiDrums)

        m_frmWiiDrums = pfrmWiiDrums

    End Sub

    Private m_frmWiiDrums As frmWiiDrums

    Public Property WiiDrums() As frmWiiDrums
        Get
            Return m_frmWiiDrums
        End Get
        Set(ByVal value As frmWiiDrums)
            m_frmWiiDrums = value
        End Set
    End Property

    Public PositionNotify As BufferPositionNotify() = New BufferPositionNotify(NumberRecordNotifications + 1) {}
    Public Const NumberRecordNotifications As Integer = 16
    Public NotificationEvent As AutoResetEvent = Nothing
    Public applicationBuffer As CaptureBuffer = Nothing
    Public CaptureDeviceGuid As Guid = Guid.Empty
    Public applicationDevice As Capture = Nothing
    Private FileName As String = String.Empty
    Public applicationNotify As Notify = Nothing
    Private NotifyThread As Thread = Nothing
    Private WaveFile As FileStream = Nothing
    Private Writer As BinaryWriter = Nothing
    Private Path As String = String.Empty
    Public CaptureBufferSize As Integer = 0
    Public NextCaptureOffset As Integer = 0
    Private Recording As Boolean = False
    Public InputFormat As WaveFormat
    Private SampleCount As Integer = 0
    Public NotifySize As Integer = 0
    Private Capturing As Boolean = False

End Class
